package com.lzy.dao;

import com.lzy.entity.SysUserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 用户信息表
 * 
 * @author lyw
 * @email lyw@gmail.com
 * @date 2023-02-02 17:06:20
 */
@Mapper
public interface SysUserDao extends BaseMapper<SysUserEntity> {
  List<String> selectUserPermission(@Param("userId") Long userId);

  int selectUserByUserName(@Param("userName") String userName);

  int selectUserByPhoneNumber(@Param("phonenumber") String phonenumber);

  int selectUserByEmail(@Param("email") String email);

  void updateUser(SysUserEntity user);

  void updateUserPwd(Long userId, String password);

  List<SysUserEntity> selectUserByConditional(SysUserEntity sysUserEntity);

  IPage<Map<String, Object>> selectPageList(Page<Map<String, Object>> result, @Param("user") SysUserEntity sysUserEntity);
}
